<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Event</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.curl-version.html">curl_version</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro.event.html">简介</a></div>
 <div class="up"><a href="refs.remote.other.html">其它服务</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="book.event" class="book">
 <h1 class="title">Event</h1>
 
 
 




 




 




 




 




 




 




 




 




 




 




 




 




 




 




 




 




 




 





<ul class="chunklist chunklist_book"><li><a href="intro.event.html">简介</a></li><li><a href="event.setup.html">安装／配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="event.requirements.html">需求</a></li><li><a href="event.installation.html">安装</a></li><li><a href="event.configuration.html">运行时配置</a></li><li><a href="event.resources.html">资源类型</a></li></ul></li><li><a href="event.examples.html">范例</a></li><li><a href="event.flags.html">Event flags</a></li><li><a href="event.persistence.html">About event persistence</a></li><li><a href="event.callbacks.html">Event callbacks</a></li><li><a href="event.constructing.signal.events.html">Constructing signal events</a></li><li><a href="class.event.html">Event</a> — The Event class<ul class="chunklist chunklist_book chunklist_children"><li><a href="event.add.html">Event::add</a> — Makes event pending</li><li><a href="event.addsignal.html">Event::addSignal</a> — Makes signal event pending</li><li><a href="event.addtimer.html">Event::addTimer</a> — Makes timer event pending</li><li><a href="event.construct.html">Event::__construct</a> — Constructs Event object</li><li><a href="event.del.html">Event::del</a> — Makes event non-pending</li><li><a href="event.delsignal.html">Event::delSignal</a> — Makes signal event non-pending</li><li><a href="event.deltimer.html">Event::delTimer</a> — Makes timer event non-pending</li><li><a href="event.free.html">Event::free</a> — Make event non-pending and free resources allocated for this
  event.</li><li><a href="event.getsupportedmethods.html">Event::getSupportedMethods</a> — Returns array with of the names of the methods supported in this version of Libevent</li><li><a href="event.pending.html">Event::pending</a> — Detects whether event is pending or scheduled</li><li><a href="event.set.html">Event::set</a> — Re-configures event</li><li><a href="event.setpriority.html">Event::setPriority</a> — Set event priority</li><li><a href="event.settimer.html">Event::setTimer</a> — Re-configures timer event</li><li><a href="event.signal.html">Event::signal</a> — Constructs signal event object</li><li><a href="event.timer.html">Event::timer</a> — Constructs timer event object</li></ul></li><li><a href="class.eventbase.html">EventBase</a> — The EventBase class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventbase.construct.html">EventBase::__construct</a> — Constructs EventBase object</li><li><a href="eventbase.dispatch.html">EventBase::dispatch</a> — Dispatch pending events</li><li><a href="eventbase.exit.html">EventBase::exit</a> — Stop dispatching events</li><li><a href="eventbase.getfeatures.html">EventBase::getFeatures</a> — Returns bitmask of features supported</li><li><a href="eventbase.getmethod.html">EventBase::getMethod</a> — Returns event method in use</li><li><a href="eventbase.gettimeofdaycached.html">EventBase::getTimeOfDayCached</a> — Returns the current event base time</li><li><a href="eventbase.gotexit.html">EventBase::gotExit</a> — Checks if the event loop was told to exit</li><li><a href="eventbase.gotstop.html">EventBase::gotStop</a> — Checks if the event loop was told to exit</li><li><a href="eventbase.loop.html">EventBase::loop</a> — Dispatch pending events</li><li><a href="eventbase.priorityinit.html">EventBase::priorityInit</a> — Sets number of priorities per event base</li><li><a href="eventbase.reinit.html">EventBase::reInit</a> — Re-initialize event base(after a fork).</li><li><a href="eventbase.stop.html">EventBase::stop</a> — Tells event_base to stop dispatching events</li></ul></li><li><a href="class.eventbuffer.html">EventBuffer</a> — The EventBuffer class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventbuffer.add.html">EventBuffer::add</a> — Append data to the end of an event buffer</li><li><a href="eventbuffer.addbuffer.html">EventBuffer::addBuffer</a> — Move all data from a buffer provided to the current instance of EventBuffer</li><li><a href="eventbuffer.appendfrom.html">EventBuffer::appendFrom</a> — Moves the specified number of bytes from a source buffer to the
  end of the current buffer</li><li><a href="eventbuffer.construct.html">EventBuffer::__construct</a> — Constructs EventBuffer object</li><li><a href="eventbuffer.copyout.html">EventBuffer::copyout</a> — Copies out specified number of bytes from the front of the buffer</li><li><a href="eventbuffer.drain.html">EventBuffer::drain</a> — Removes specified number of bytes from the front of the buffer
  without copying it anywhere</li><li><a href="eventbuffer.enablelocking.html">EventBuffer::enableLocking</a> — 说明</li><li><a href="eventbuffer.expand.html">EventBuffer::expand</a> — Reserves space in buffer</li><li><a href="eventbuffer.freeze.html">EventBuffer::freeze</a> — Prevent calls that modify an event buffer from succeeding</li><li><a href="eventbuffer.lock.html">EventBuffer::lock</a> — Acquires a lock on buffer</li><li><a href="eventbuffer.prepend.html">EventBuffer::prepend</a> — Prepend data to the front of the buffer</li><li><a href="eventbuffer.prependbuffer.html">EventBuffer::prependBuffer</a> — Moves all data from source buffer to the front of current buffer</li><li><a href="eventbuffer.pullup.html">EventBuffer::pullup</a> — Linearizes data within buffer
  and returns it's contents as a string</li><li><a href="eventbuffer.read.html">EventBuffer::read</a> — Read data from an evbuffer and drain the bytes read</li><li><a href="eventbuffer.readfrom.html">EventBuffer::readFrom</a> — Read data from a file onto the end of the buffer</li><li><a href="eventbuffer.readline.html">EventBuffer::readLine</a> — Extracts a line from the front of the buffer</li><li><a href="eventbuffer.search.html">EventBuffer::search</a> — Scans the buffer for an occurrence of a string</li><li><a href="eventbuffer.searcheol.html">EventBuffer::searchEol</a> — Scans the buffer for an occurrence of an end of line</li><li><a href="eventbuffer.substr.html">EventBuffer::substr</a> — Substracts a portion of the buffer data</li><li><a href="eventbuffer.unfreeze.html">EventBuffer::unfreeze</a> — Re-enable calls that modify an event buffer</li><li><a href="eventbuffer.unlock.html">EventBuffer::unlock</a> — Releases lock acquired by EventBuffer::lock</li><li><a href="eventbuffer.write.html">EventBuffer::write</a> — Write contents of the buffer to a file or socket</li></ul></li><li><a href="class.eventbufferevent.html">EventBufferEvent</a> — The EventBufferEvent class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventbufferevent.connect.html">EventBufferEvent::connect</a> — Connect buffer event's file descriptor to given address or
  UNIX socket</li><li><a href="eventbufferevent.connecthost.html">EventBufferEvent::connectHost</a> — Connects to a hostname with optionally asyncronous DNS resolving</li><li><a href="eventbufferevent.construct.html">EventBufferEvent::__construct</a> — Constructs EventBufferEvent object</li><li><a href="eventbufferevent.createpair.html">EventBufferEvent::createPair</a> — Creates two buffer events connected to each other</li><li><a href="eventbufferevent.disable.html">EventBufferEvent::disable</a> — Disable events read, write, or both on a buffer event.</li><li><a href="eventbufferevent.enable.html">EventBufferEvent::enable</a> — Enable events read, write, or both on a buffer event.</li><li><a href="eventbufferevent.free.html">EventBufferEvent::free</a> — Free a buffer event</li><li><a href="eventbufferevent.getdnserrorstring.html">EventBufferEvent::getDnsErrorString</a> — Returns string describing the last failed DNS lookup attempt</li><li><a href="eventbufferevent.getenabled.html">EventBufferEvent::getEnabled</a> — Returns bitmask of events currently enabled on the buffer event</li><li><a href="eventbufferevent.getinput.html">EventBufferEvent::getInput</a> — Returns underlying input buffer associated with current buffer
  event</li><li><a href="eventbufferevent.getoutput.html">EventBufferEvent::getOutput</a> — Returns underlying output buffer associated with current buffer
  event</li><li><a href="eventbufferevent.read.html">EventBufferEvent::read</a> — Read buffer's data</li><li><a href="eventbufferevent.readbuffer.html">EventBufferEvent::readBuffer</a> — Drains the entire contents of the input buffer and places them into buf</li><li><a href="eventbufferevent.setcallbacks.html">EventBufferEvent::setCallbacks</a> — Assigns read, write and event(status) callbacks</li><li><a href="eventbufferevent.setpriority.html">EventBufferEvent::setPriority</a> — Assign a priority to a bufferevent</li><li><a href="eventbufferevent.settimeouts.html">EventBufferEvent::setTimeouts</a> — Set the read and write timeout for a buffer event</li><li><a href="eventbufferevent.setwatermark.html">EventBufferEvent::setWatermark</a> — Adjusts read and/or write watermarks</li><li><a href="eventbufferevent.sslerror.html">EventBufferEvent::sslError</a> — Returns most recent OpenSSL error reported on the buffer event</li><li><a href="eventbufferevent.sslfilter.html">EventBufferEvent::sslFilter</a> — Create a new SSL buffer event to send its data over another buffer event</li><li><a href="eventbufferevent.sslrenegotiate.html">EventBufferEvent::sslRenegotiate</a> — Tells a bufferevent to begin SSL renegotiation.</li><li><a href="eventbufferevent.sslsocket.html">EventBufferEvent::sslSocket</a> — Creates a new SSL buffer event to send its data over an SSL on a socket</li><li><a href="eventbufferevent.write.html">EventBufferEvent::write</a> — Adds data to a buffer event's output buffer</li><li><a href="eventbufferevent.writebuffer.html">EventBufferEvent::writeBuffer</a> — Adds contents of the entire buffer to a buffer event's output
  buffer</li></ul></li><li><a href="eventbufferevent.about.callbacks.html">About buffer event callbacks</a></li><li><a href="class.eventconfig.html">EventConfig</a> — The EventConfig class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventconfig.avoidmethod.html">EventConfig::avoidMethod</a> — Tells libevent to avoid specific event method</li><li><a href="eventconfig.construct.html">EventConfig::__construct</a> — Constructs EventConfig object</li><li><a href="eventconfig.requirefeatures.html">EventConfig::requireFeatures</a> — Enters a required event method feature that the application demands</li><li><a href="eventconfig.setmaxdispatchinterval.html">EventConfig::setMaxDispatchInterval</a> — Prevents priority inversion</li></ul></li><li><a href="class.eventdnsbase.html">EventDnsBase</a> — The EventDnsBase class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventdnsbase.addnameserverip.html">EventDnsBase::addNameserverIp</a> — Adds a nameserver to the DNS base</li><li><a href="eventdnsbase.addsearch.html">EventDnsBase::addSearch</a> — Adds a domain to the list of search domains</li><li><a href="eventdnsbase.clearsearch.html">EventDnsBase::clearSearch</a> — Removes all current search suffixes</li><li><a href="eventdnsbase.construct.html">EventDnsBase::__construct</a> — Constructs EventDnsBase object</li><li><a href="eventdnsbase.countnameservers.html">EventDnsBase::countNameservers</a> — Gets the number of configured nameservers</li><li><a href="eventdnsbase.loadhosts.html">EventDnsBase::loadHosts</a> — Loads a hosts file (in the same format as /etc/hosts) from hosts file</li><li><a href="eventdnsbase.parseresolvconf.html">EventDnsBase::parseResolvConf</a> — Scans the resolv.conf-formatted file</li><li><a href="eventdnsbase.setoption.html">EventDnsBase::setOption</a> — Set the value of a configuration option</li><li><a href="eventdnsbase.setsearchndots.html">EventDnsBase::setSearchNdots</a> — Set the 'ndots' parameter for searches</li></ul></li><li><a href="class.eventhttp.html">EventHttp</a> — The EventHttp class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventhttp.accept.html">EventHttp::accept</a> — Makes an HTTP server accept connections on the specified socket stream or resource</li><li><a href="eventhttp.addserveralias.html">EventHttp::addServerAlias</a> — Adds a server alias to the HTTP server object</li><li><a href="eventhttp.bind.html">EventHttp::bind</a> — Binds an HTTP server on the specified address and port</li><li><a href="eventhttp.construct.html">EventHttp::__construct</a> — Constructs EventHttp object(the HTTP server)</li><li><a href="eventhttp.removeserveralias.html">EventHttp::removeServerAlias</a> — Removes server alias</li><li><a href="eventhttp.setallowedmethods.html">EventHttp::setAllowedMethods</a> — Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks</li><li><a href="eventhttp.setcallback.html">EventHttp::setCallback</a> — Sets a callback for specified URI</li><li><a href="eventhttp.setdefaultcallback.html">EventHttp::setDefaultCallback</a> — Sets default callback to handle requests that are not caught by specific callbacks</li><li><a href="eventhttp.setmaxbodysize.html">EventHttp::setMaxBodySize</a> — Sets maximum request body size</li><li><a href="eventhttp.setmaxheaderssize.html">EventHttp::setMaxHeadersSize</a> — Sets maximum HTTP header size</li><li><a href="eventhttp.settimeout.html">EventHttp::setTimeout</a> — Sets the timeout for an HTTP request</li></ul></li><li><a href="class.eventhttpconnection.html">EventHttpConnection</a> — The EventHttpConnection class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventhttpconnection.construct.html">EventHttpConnection::__construct</a> — Constructs EventHttpConnection object</li><li><a href="eventhttpconnection.getbase.html">EventHttpConnection::getBase</a> — Returns event base associated with the connection</li><li><a href="eventhttpconnection.getpeer.html">EventHttpConnection::getPeer</a> — Gets the remote address and port associated with the connection</li><li><a href="eventhttpconnection.makerequest.html">EventHttpConnection::makeRequest</a> — Makes an HTTP request over the specified connection</li><li><a href="eventhttpconnection.setclosecallback.html">EventHttpConnection::setCloseCallback</a> — Set callback for connection close</li><li><a href="eventhttpconnection.setlocaladdress.html">EventHttpConnection::setLocalAddress</a> — Sets the IP address from which HTTP connections are made</li><li><a href="eventhttpconnection.setlocalport.html">EventHttpConnection::setLocalPort</a> — Sets the local port from which connections are made</li><li><a href="eventhttpconnection.setmaxbodysize.html">EventHttpConnection::setMaxBodySize</a> — Sets maximum body size for the connection</li><li><a href="eventhttpconnection.setmaxheaderssize.html">EventHttpConnection::setMaxHeadersSize</a> — Sets maximum header size</li><li><a href="eventhttpconnection.setretries.html">EventHttpConnection::setRetries</a> — Sets the retry limit for the connection</li><li><a href="eventhttpconnection.settimeout.html">EventHttpConnection::setTimeout</a> — Sets the timeout for the connection</li></ul></li><li><a href="class.eventhttprequest.html">EventHttpRequest</a> — The EventHttpRequest class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventhttprequest.addheader.html">EventHttpRequest::addHeader</a> — Adds an HTTP header to the headers of the request</li><li><a href="eventhttprequest.cancel.html">EventHttpRequest::cancel</a> — Cancels a pending HTTP request</li><li><a href="eventhttprequest.clearheaders.html">EventHttpRequest::clearHeaders</a> — Removes all output headers from the header list of the request</li><li><a href="eventhttprequest.closeconnection.html">EventHttpRequest::closeConnection</a> — Closes associated HTTP connection</li><li><a href="eventhttprequest.construct.html">EventHttpRequest::__construct</a> — Constructs EventHttpRequest object</li><li><a href="eventhttprequest.findheader.html">EventHttpRequest::findHeader</a> — Finds the value belonging a header</li><li><a href="eventhttprequest.free.html">EventHttpRequest::free</a> — Frees the object and removes associated events</li><li><a href="eventhttprequest.getbufferevent.html">EventHttpRequest::getBufferEvent</a> — Returns EventBufferEvent object</li><li><a href="eventhttprequest.getcommand.html">EventHttpRequest::getCommand</a> — Returns the request command(method)</li><li><a href="eventhttprequest.getconnection.html">EventHttpRequest::getConnection</a> — Returns EventHttpConnection object</li><li><a href="eventhttprequest.gethost.html">EventHttpRequest::getHost</a> — Returns the request host</li><li><a href="eventhttprequest.getinputbuffer.html">EventHttpRequest::getInputBuffer</a> — Returns the input buffer</li><li><a href="eventhttprequest.getinputheaders.html">EventHttpRequest::getInputHeaders</a> — Returns associative array of the input headers</li><li><a href="eventhttprequest.getoutputbuffer.html">EventHttpRequest::getOutputBuffer</a> — Returns the output buffer of the request</li><li><a href="eventhttprequest.getoutputheaders.html">EventHttpRequest::getOutputHeaders</a> — Returns associative array of the input headers</li><li><a href="eventhttprequest.getresponsecode.html">EventHttpRequest::getResponseCode</a> — Returns the the response code</li><li><a href="eventhttprequest.geturi.html">EventHttpRequest::getUri</a> — Returns the request URI</li><li><a href="eventhttprequest.removeheader.html">EventHttpRequest::removeHeader</a> — Removes an HTTP header from the headers of the request</li><li><a href="eventhttprequest.senderror.html">EventHttpRequest::sendError</a> — Send an HTML error message to the client</li><li><a href="eventhttprequest.sendreply.html">EventHttpRequest::sendReply</a> — Send an HTML reply to the client</li><li><a href="eventhttprequest.sendreplychunk.html">EventHttpRequest::sendReplyChunk</a> — Send another data chunk as part of an ongoing chunked reply</li><li><a href="eventhttprequest.sendreplyend.html">EventHttpRequest::sendReplyEnd</a> — Complete a chunked reply, freeing the request as appropriate</li><li><a href="eventhttprequest.sendreplystart.html">EventHttpRequest::sendReplyStart</a> — Initiate a chunked reply</li></ul></li><li><a href="class.eventlistener.html">EventListener</a> — The EventListener class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventlistener.construct.html">EventListener::__construct</a> — Creates new connection listener associated with an event base</li><li><a href="eventlistener.disable.html">EventListener::disable</a> — Disables an event connect listener object</li><li><a href="eventlistener.enable.html">EventListener::enable</a> — Enables an event connect listener object</li><li><a href="eventlistener.getbase.html">EventListener::getBase</a> — Returns event base associated with the event listener</li><li><a href="eventlistener.getsocketname.html">EventListener::getSocketName</a> — Retreives the current address to which the
  listener's socket is bound.</li><li><a href="eventlistener.setcallback.html">EventListener::setCallback</a> — The setCallback purpose</li><li><a href="eventlistener.seterrorcallback.html">EventListener::setErrorCallback</a> — Set event listener's error callback</li></ul></li><li><a href="class.eventsslcontext.html">EventSslContext</a> — The EventSslContext class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventsslcontext.construct.html">EventSslContext::__construct</a> — Constructs an OpenSSL context for use with Event classes</li></ul></li><li><a href="class.eventutil.html">EventUtil</a> — The EventUtil class<ul class="chunklist chunklist_book chunklist_children"><li><a href="eventutil.construct.html">EventUtil::__construct</a> — The abstract constructor</li><li><a href="eventutil.getlastsocketerrno.html">EventUtil::getLastSocketErrno</a> — Returns the most recent socket error number</li><li><a href="eventutil.getlastsocketerror.html">EventUtil::getLastSocketError</a> — Returns the most recent socket error</li><li><a href="eventutil.getsocketfd.html">EventUtil::getSocketFd</a> — Returns numeric file descriptor of a socket, or stream</li><li><a href="eventutil.getsocketname.html">EventUtil::getSocketName</a> — Retreives the current address to which the
  socket is bound.</li><li><a href="eventutil.setsocketoption.html">EventUtil::setSocketOption</a> — Sets socket options</li><li><a href="eventutil.sslrandpoll.html">EventUtil::sslRandPoll</a> — Generates entropy by means of OpenSSL's RAND_poll()</li></ul></li></ul></div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.curl-version.html">curl_version</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro.event.html">简介</a></div>
 <div class="up"><a href="refs.remote.other.html">其它服务</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
